package com.heima.bos.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.heima.bos.dao.impl.BaseDaoImpl;
import com.heima.bos.dao.impl.RegionDao;
import com.heima.bos.domain.Region;
@Transactional
@Service
public class RegionService extends BaseService<Region>{
	@Resource
	private RegionDao regionDao; 
	@Override
	public BaseDaoImpl<Region> getDao() {
		return regionDao;
	}
	/**
	 * 批量导入数据
	 * @param list
	 */
	public void batchImport(List<Region> list) {
		for (Region region : list) {
			regionDao.saveOrUpdate(region);
		}
	}

}
